package top.lingchen.blogapi.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.lingchen.blogapi.service.LoginService;
import top.lingchen.blogapi.vo.Result;
import top.lingchen.blogapi.vo.params.LoginParam;

/**
 * @Author 凌宸
 * @create 2021-12-16 下午 7:08
 * @Description
 * @Version 1.0
 */
@RestController
@RequestMapping("/register")
public class RegisterController {
    @Autowired
    private LoginService loginService;

    @PostMapping
    public Result register(@RequestBody LoginParam loginParam){
        // sso 单点登录，后期如果把登录注册功能提出去(单点服务，可以独立提供接口服务)
        return loginService.register(loginParam);
    }
}
